package com.freesky.web.portal.reomte;

import com.freesky.common.pojo.Result;
import com.freesky.common.utils.reponse.JSONResponse;
import com.freesky.common.vo.VOAddress;
import com.freesky.web.portal.reomte.fallback.AddressRemoteFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
@FeignClient(name = "emall-provider-zuul", fallback = AddressRemoteFallback.class)
public interface AddressRemote {
    String ZUUL_URL_PREFIX ="/mysevice/order";
    @PostMapping(value = ZUUL_URL_PREFIX+"/member/address/list")
    JSONResponse addressList(@RequestBody VOAddress address);

    @PostMapping(value = ZUUL_URL_PREFIX+"/member/address")
     Result<VOAddress> address(@RequestBody VOAddress address);

    @PostMapping(value = ZUUL_URL_PREFIX+"/member/address/add")
     Result<Object> addAddress(@RequestBody VOAddress address);

    @PostMapping(value =ZUUL_URL_PREFIX+ "/member/address/update")
     Result<Object> updateAddress(@RequestBody VOAddress address);

    @PostMapping(value = ZUUL_URL_PREFIX+"/member/address/del")
     Result<Object> delAddress(@RequestBody VOAddress address);
}
